package com.stockz.indicator.vsa.pattern;

import java.util.ArrayList;
import java.util.List;

import com.stockz.core.model.Bar;
import com.stockz.indicator.vsa.VsaBar;

public abstract class VsaPattern {
	
	private static List<VsaPattern> vsaPatternList = new ArrayList<VsaPattern>();
	
	public static VsaPattern[] values(){
		return vsaPatternList.toArray(new VsaPattern[0]);
	}
	
	private final String shortName;
	private final String fullName;
	private final VsaPatternType vsaPatternType;
	
	public VsaPattern(String shortName, String fullName,
			VsaPatternType vsaPatternType) {
		this.shortName = shortName;
		this.fullName = fullName;
		this.vsaPatternType = vsaPatternType;
		if(!vsaPatternList.contains(this)){
			vsaPatternList.add(this);			
		}
	}

	public abstract void analyze(List<Bar> barList,List<VsaBar> vsaBarList,int index);

	public String getShortName() {
		return shortName;
	}

	public String getFullName() {
		return fullName;
	}

	public VsaPatternType getVsaPatternType() {
		return vsaPatternType;
	}
	
}
